<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=script, initial-scale=1.0">
	<title>Document</title>
</head>
<body>
	<script>
		/* 
		var arr = [80,90,73,58]
		var arr2 = arr.map(function(item) {
			// item 数组中的每个数据
			return item+10
		})
		console.log(arr2)
		 */
		var parking = [
			{
				zid: 1,
				longitude: 119.444,
				latitude: 39.78923,
				zname: '天通苑一区'
			},
			{
				zid: 2,
				longitude: 119.3333,
				latitude: 39.78923,
				zname: '天通苑二区'
			},
			{
				zid: 3,
				longitude: 119.663,
				latitude: 39.78923,
				zname: '天通苑三区'
			}
		]
		// 数据映射
		var newList = parking.map(function(item) {
			return {
				id: item.zid,
				longitude: item.longitude,
				latitude: item.latitude,
				iconPath: '/static/img/loc.png'
			}
		})
		console.log(newList)
	</script>
</body>
</html>